home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1869_NetInfo_Kit.rtf < prev    next >
Text File  |  1995-06-12  |  6KB  |  114 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\fmodern Ohlfs;}
  2. \paperw12300
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red84\green84\blue84;\red83\green83\blue83;\red82\green82\blue82;}
  7. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\f0\b0\i0\ulnone\fs28\fc1\cf1 Q: I've read the release notes about the NetInfoKit (NIKit).  Is there additional information about these objects and how to use them? \
  8. \
  9. A: The only documentation that is currently available are the on-line Release Notes on 2.0 and whatever you can glean from the .h files.  As you saw from those notes, it provides you with a rough overview of the objects available in the NIKit, but doesn't provide you with any reference material. Through this document, we hope to shed some light on the NIKit objects, how to use them, and for what purpose.\
  10. \
  11. Feedback for these objects would be greatly appreciated by the folks in engineering. Please send your feedback to bug_next@next.com.\
  12. \
  13.  
  14. \b NIDomain object
  15. \b0 \
  16. The first object, the NIDomain object, was created so that the other objects could have something through which to communicate to the NIKit database.  The panel objects (like NIOpenPanel) use NIDomain to set and retrieve data from the NetInfo database.  This object is the most likely one to change in future releases. You probably won't use NIDomain directly in your application, since the panel objects provide a higher level interface to it.\
  17. \
  18.  
  19. \b NIDomainPanel Object
  20. \b0 \
  21. The NIDomainPanel object is essentially a browser. It browses through the domain hierarchy, and displays it (much like the file system browser). To use the NIDomainPanel you should follow these steps:\
  22. \
  23.     - 
  24. \b new
  25. \b0  \
  26.         returns an id for the new instance of the NIDomainPanel.\
  27.     - 
  28. \b runModal
  29. \b0 \
  30.         this runs a modal loop which exits when the user clicks ok or cancel\
  31.     - 
  32. \b exitFlags
  33. \b0 \
  34.         returns whether the user clicked ok or cancel\
  35.     - 
  36. \b domain
  37. \b0 \
  38.         returns the name of the domain that the user has selected.\
  39.     \
  40. The other methods are primarily there in case you wish to override them and provide some special functionality. Most useful are 
  41. \b cancel
  42. \b0 , 
  43. \b ok
  44. \b0  and 
  45. \b domain
  46. \b0 .\
  47. \
  48.  
  49. \b NIOpenPanel Object
  50. \b0 \
  51. The next object, NIOpenPanel is a sub class of NIDomainPanel. It is used to display and select a particular directory from a list of its peers inside of any NetInfo domain in the hierarchy. It's analogous to the OpenPanel for filesystems. NIOpenPanel consists of the domain browser (which it inherits from the NIDomainPanel), buttons and a scrolling list of directories. You create an NIOpenPanel the same way in which you create a NIDomainPanel: using 
  52. \b new
  53. \b0  and 
  54. \b runModal
  55. \b0 .  The other really interesting methods in NIOpenPanel are the 
  56. \b directory
  57. \b0  and 
  58. \b setDirectoryPath
  59. \b0  methods which you can use to programmatically browse to the directory path that you want from inside of the domains, or ask the NIOpenPanel where it currently is browsed to.\
  60. \
  61.  
  62. \b NISavePanel Object
  63. \b0 \
  64. NISavePanel is a subclass of NIOpenPanel, and is used to assist in saving changes to an open directory in a particular domain. NISavePanel is very much like NIOpenPanel, but with some additional functionality.  It provides three different 
  65. \b runModal
  66. \b0  routines. 
  67. \b runModal
  68. \b0  is the one which you will use most frequently. It will start such that the browser is displaying your current domain. 
  69. \b runModalWithString
  70. \b0  runs a modal loop, and starts up such that the browser is displaying the domain which is passed in through "initialValue". 
  71. \b runModalwithUneditableString
  72. \b0  is the same except for the fact that the directory is uneditable. It is used this way inside the NetManager and UserManager where the name of the directory is a fundamental property of the machine or user being edited and cannot be changed on the fly while performing a Save To.\
  73. \
  74. \
  75.  
  76. \b NILoginPanel Object
  77. \b0 \
  78. And finally the NILoginPanel. This is probably the object for which you will have the most use. The login panel is used to verify (authenticate) a user's identification. You can either rely on the user id and password that are stored in the NI database, or you can use your own. There are three 
  79. \b runModal
  80. \b0  methods in this object as well:\
  81. \
  82.  
  83. \b     - (BOOL)runModal:sender inDomain:(void *) domainID;\
  84.  
  85. \b0     This runs the login dialog modally with the default user "root".\
  86.         \
  87.  
  88. \b     - (BOOL)runModal:sender withUser:(char *)userName inDomain:(void *)domainID\
  89.         withString:(const char *)whatWarning allowChange:(BOOL)disableUser;\
  90.  
  91. \b0     This runs the login dialog modally with the user as specified. You can change the message\
  92.     displayed on the panel by using the withString argument. Also, this method allows the user to\
  93.     edit the default user name.\
  94.         \
  95.  
  96. \b     - (BOOL)runModalwithValidation:sender withUser:(const char *)userName\
  97.         inDomain:(void *) domainID withString:(const char *)whatWarning\
  98.         allowChange:(BOOL)enableUser;\
  99.  
  100. \b0     This runs the login dialog modally as the previous method. However, this one requires validation.\
  101.     With this modal method you can provide your own password validation scheme. You use this\
  102.     in conjunction with the NILoginPanelDelegate's 
  103. \b authenticateUser
  104. \b0  method.\
  105.     \
  106. At this point there is no example code from which you can learn to use these objects wisely (or at all). For examples about how these NIKit objects look and for an idea of how they can be put to good use, you can look at the system administration tools in /NextAdmin.  Most of them use the NIKit.   Future changes in the NIKit will be made to better support these applications.\
  107. \
  108. QA697\
  109. \
  110. Valid for 2.0, 3.0\
  111. \
  112.  
  113.  
  114.